package com.example.zuoye.mvp.model;

import com.example.mylibrary.http.RetrofitManager;
import com.example.mylibrary.mvp.model.BaseModel;
import com.example.zuoye.api.APi;
import com.example.zuoye.bean.TagTravel;
import com.example.zuoye.bean.UserBean;
import com.example.zuoye.mvp.contract.MainContract;

import java.util.List;

import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

public class MainModel extends BaseModel implements MainContract.Model {
    @Override
    public void request(Observer<List<UserBean>> observer) {
        RetrofitManager.getInstance().getRetrofit().create(APi.class)
                .tag()
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(observer);
    }


}
